Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: onboard onto ruff #38

Open
wants to merge 5 commits into
base: main
Choose a base branch
from
Open

fix: onboard onto ruff #38

wants to merge 5 commits into from

Conversation

AbeCoull
Copy link
Contributor

Issue #, if available:

Description of changes:
Ruff is a good linter/formatter that Braket should be looking into. If has speed improvements, good support coverage, and is actively being adopted around the Python community. Additionally, this can drop the number of tools in our tool chain flake8, isort, black -> ruff.

In summary, some reasons:

  • It is fast - about 10x faster than flake8
  • Used by mane places, scipy, pypi, pandas, etc
  • has an autofix feature
  • Able to replace isort, black, and flake8 as one tool

Testing done:

Merge Checklist

Put an x in the boxes that apply. You can also fill these out after creating the PR. If you're unsure about any of them, don't hesitate to ask. We're here to help! This is simply a reminder of what we are going to look for before merging your pull request.

General

Tests

  • I have added tests that prove my fix is effective or that my feature works (if appropriate)
  • I have checked that my tests are not configured for a specific region or account (if appropriate)

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

@AbeCoull AbeCoull requested a review from a team as a code owner September 12, 2024 20:39
Copy link

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Performance Alert ⚠️

Possible performance regression was detected for benchmark 'Python Benchmark with pytest-benchmark'.
Benchmark result of this commit is worse than the previous benchmark result exceeding threshold 2.

Benchmark suite Current: 43998be Previous: 22529c1 Ratio
benchmark/benchmark.py::test_exact_shots[ghz-density_matrix q[0], q[1]-9-braket_dm_v2] 75.95764127945702 iter/sec (stddev: 0) 153.71055748678359 iter/sec (stddev: 0) 2.02
benchmark/benchmark.py::test_exact_shots[ghz-probability-9-braket_sv] 44.38111318766544 iter/sec (stddev: 0) 107.64480950290103 iter/sec (stddev: 0) 2.43
benchmark/benchmark.py::test_exact_shots[qft-expectation z(q[0])-14-braket_sv_v2] 39.02024107890235 iter/sec (stddev: 0) 111.87265312130869 iter/sec (stddev: 0) 2.87
benchmark/benchmark.py::test_exact_shots[qft-variance y(q[0])-7-braket_dm_v2] 104.77167506991243 iter/sec (stddev: 0) 226.40145215726892 iter/sec (stddev: 0) 2.16
benchmark/benchmark.py::test_nonzero_shots[qft-sample z(q[0])-100-13-braket_sv_v2] 30.859642495239537 iter/sec (stddev: 0) 97.55205982732475 iter/sec (stddev: 0) 3.16

This comment was automatically generated by workflow using github-action-benchmark.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant